//
//  TextFiledView.m
//  WULIHH
//
//  Created by Gamefire on 16/4/18.
//  Copyright © 2016年 tang. All rights reserved.
//

#import "TextFiledView.h"
#import "Header.h"

#define  UIColorRGBA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
@implementation TextFiledView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        [self initUI];
    }
    return self;
}
-(void)initUI{
    
//    UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(10, 10, 25, 25)];
//    [imageView setBackgroundColor:[UIColor redColor]];
//    [imageView.layer setCornerRadius:25.0 / 2.0];
//    [self addSubview:imageView];
    
    UIView *lineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0.5f, WithView, 0.5f)];
    [lineView setBackgroundColor:[UIColor grayColor]];
    [self addSubview:lineView];
    
    
    UITextField *textfiled = [[UITextField alloc] initWithFrame:CGRectMake(30, 8.0, biliwith(228.0), 32.5)];
    [textfiled setBorderStyle:UITextBorderStyleNone];
    [textfiled.layer setCornerRadius:32.5 / 2.0];
    [textfiled setFont:[UIFont systemFontOfSize:13.5]];
    [textfiled setBackgroundColor:UIColorRGBA(230, 230, 230, 1)];
    [textfiled setPlaceholder:@"发表评论"];
    [self addSubview:textfiled];
    
    
    UIButton *rightBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [rightBtn setFrame:CGRectMake(WithView-40.0, 10.0, 30, 25)];
    [rightBtn setTitle:@"发布" forState:UIControlStateNormal];
    [rightBtn.titleLabel setFont:[UIFont systemFontOfSize:15.0]];
    [rightBtn setTitleColor:UIColorRGBA(96, 96, 96, 1) forState:UIControlStateNormal];
    [self addSubview:rightBtn];


}

@end
